package com.tgslc.defaultmanagement.manage;

import javax.faces.event.ActionEvent;

import oracle.adf.view.rich.component.rich.data.RichTable;

import oracle.adfinternal.view.faces.model.binding.FacesCtrlHierNodeBinding;

import oracle.jbo.Row;


public class listBean {

  private Long borrowerId;
  private RichTable borrowerTable;

  public void setBorrowerId(Long borrowerId) {
    this.borrowerId = borrowerId;
  }

  public Long getBorrowerId() {
    return borrowerId;
  }

  public void setBorrowerTable(RichTable borrowerTable) {
    this.borrowerTable = borrowerTable;
  }

  public RichTable getBorrowerTable() {
    return borrowerTable;
  }
  
  public void borrowerClicked(ActionEvent actionEvent) {
    RichTable table = this.getBorrowerTable();
    FacesCtrlHierNodeBinding binding =
      (FacesCtrlHierNodeBinding)table.getSelectedRowData();
    Row row = binding.getCurrentRow();
    Long borrowerId = (Long)row.getAttribute(0);
    System.out.println(borrowerId);
    this.borrowerId = borrowerId;
  }
}
